home *** CD-ROM | disk | FTP | other *** search
- #! /sprite/cmds/csh -f
- #
- # Usage: doversion releaseNumber versionInfo outFile
- #
- # releaseNumber is the major number for the version (currently 1)
- # versionInfo controls the minor number of the version. If it is
- # TRUE then the version is incremented from the last build, if
- # it is FALSE it is not incremented, and any other value is taken
- # to be the version number to use.
- # outFile is the name of the .h file to generate.
- #
- # $Header: /sprite/src/kernel/sprite/RCS/doversion,v 1.5 92/06/04 13:33:12 jhh Exp $ SPRITE (Berkeley)
- #
- # Copyright 1989 Regents of the University of California
- # Permission to use, copy, modify, and distribute this
- # software and its documentation for any purpose and without
- # fee is hereby granted, provided that the above copyright
- # notice appear in all copies. The University of California
- # makes no representations about the suitability of this
- # software for any purpose. It is provided "as is" without
- # express or implied warranty.
- #
-
- set release = $1
- set versionInfo = $2
- set outFile = $3
-
- set log = "no"
-
- set version = `cat version`
- switch($versionInfo)
- case "TRUE":
- case "true":
- @ version++
- echo $version > version
- set log = "yes"
- breaksw
- case "FALSE":
- case "false":
- breaksw
- default:
- set version = $versionInfo
- set log = "yes"
- breaksw
- endsw
- echo $version > version
- if ($version < 10 ) then
- set version = "00"$version
- else if ($version < 100) then
- set version = "0"$version
- endif
-
- if ("$log" == "yes") then
- co -l versionLog
- echo "" >> versionLog
- echo "$release.$version `date`" >> versionLog
- echo ""
- echo "Please log message for $release.$version in versionLog"
- echo ""
- endif
-
- echo $version
-
- mkversion -p "SPRITE VERSION $release.$version (MACHINE)" > $outFile
-
-